<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <title>乐淘商城-分类页</title>
  <link rel="icon" href="favicon.ico">
  <link rel="stylesheet" href="lib/mui/css/mui.css">
  <link rel="stylesheet" href="lib/fa/css/font-awesome.css">
  <link rel="stylesheet" href="css/common.css">
  <link rel="stylesheet" href="css/product.css">
</head>
<body>

<div class="lt_container">
  
  <div class="lt_header">
    <a href="javascript:history.go(-1);" class="icon_left"><span class="mui-icon mui-icon-back"></span></a>
    <h3>商品详情</h3>
    <a href="javascript:location.reload();" class="icon_right"><span class="mui-icon mui-icon-reload"></span></a>
  </div>
  
  <div class="lt_main">
    <!-- 滚动容器的父盒子 -->
    <div class="mui-scroll-wrapper">
      <!-- 子盒子 -->
      <div class="mui-scroll">
  
        <!-- 轮播组件 -->
        <div class="mui-slider">
          <!-- 支持循环, 需要在 group 上加一个类 loop -->
          <div class="mui-slider-group mui-slider-loop">
            <!--支持循环，需要重复图片节点-->
            <div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img src="images/banner3.png" ></a></div>
      
            <div class="mui-slider-item"><a href="#"><img src="images/banner1.png"></a></div>
            <div class="mui-slider-item"><a href="#"><img src="images/banner2.png"></a></div>
            <div class="mui-slider-item"><a href="#"><img src="images/banner3.png"></a></div>
      
            <!--支持循环，需要重复图片节点-->
            <div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img src="images/banner1.png" ></a></div>
          </div>
          <!-- 小圆点 -->
          <div class="mui-slider-indicator">
            <div class="mui-indicator mui-active"></div>
            <div class="mui-indicator"></div>
            <div class="mui-indicator"></div>
          </div>
        </div>
        
        <!-- 商品名称 -->
        <div class="lt_pro_name">
          <strong class="mui-ellipsis-2">匡威三星标1970s converse复刻 142334c 144757c三星标黑色高帮</strong>
        </div>
        
        <!-- 价格 -->
        <div class="lt_price">
          价格: <span class="price">&yen;998</span><span class="oldprice">&yen;1088</span>
        </div>
        
        <!-- 尺码 -->
        <div class="lt_size">
          尺码:
          <span class="size">10</span>
          <span class="size">10</span>
          <span class="size">10</span>
          <span class="size">10</span>
          <span class="size">10</span>
          <span class="size">10</span>
          <span class="size">10</span>
          <span class="size">10</span>
          <span class="size">10</span>
        </div>
        
        <!-- 剩余数量 -->
        <div class="lt_num">
          数量:
          <div class="mui-numbox" data-numbox-step='1' data-numbox-min='1' data-numbox-max='99'>
            <button class="mui-btn mui-numbox-btn-minus" type="button">-</button>
            <input class="mui-numbox-input" type="number" value="1" />
            <button class="mui-btn mui-numbox-btn-plus" type="button">+</button>
          </div>
  
          <span class="num">剩余数量：99 双</span>
        </div>
  
        <!-- 商品描述 -->
        <div class="lt_desc">
          详情: 描述哈哈哈哈哈哈哈哈
        </div>
        
      </div>
    </div>
  </div>
  
  <!-- 购物车 -->
  <div class="lt_go_cart">
    <a href="cart.html" class="go">去购物车</a>
    <button class="mui-btn mui-btn-danger btn_add_cart">加入购物车</button>
    <button class="mui-btn mui-btn-warning">立即购买</button>
  </div>
  
</div>


<script type="text/html" id="productTpl">
  
  <!-- 轮播组件 -->
  <div class="mui-slider">
    <!-- 支持循环, 需要在 group 上加一个类 loop -->
    <div class="mui-slider-group mui-slider-loop">
      <!--支持循环，需要重复图片节点-->
      <div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img src="{{ pic[pic.length-1].picAddr }}" ></a></div>
  
      {{ each pic v i }}
        <div class="mui-slider-item"><a href="#"><img src="{{ v.picAddr }}" /></a></div>
      {{ /each }}
      
      <!--支持循环，需要重复图片节点-->
      <div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img src="{{ pic[0].picAddr }}" ></a></div>
    </div>
    <!-- 小圆点 -->
    <div class="mui-slider-indicator">
      {{ each pic v i }}
        <div class="mui-indicator {{ i === 0 ? 'mui-active' : '' }}"></div>
      {{ /each }}
    </div>
  </div>
  
  <!-- 商品名称 -->
  <div class="lt_pro_name">
    <strong class="mui-ellipsis-2">{{ proName }}</strong>
  </div>
  
  <!-- 价格 -->
  <div class="lt_price">
    价格: <span class="price">&yen;{{ price }}</span><span class="oldprice">&yen;{{ oldPrice }}</span>
  </div>
  
  <!-- 尺码 -->
  <div class="lt_size">
    尺码:
    <!-- 拿到的是 size 40-50, 但是我们需要的是 40, 41, 42 .... -->
    
    <%
      var tempArr = size.split("-");   // ["40", "50"];
      for( var i = tempArr[0]; i <= tempArr[1]; i++ ) {
    %>
      <span class="size">{{ i }}</span>
    <%
      }
    %>
    
  </div>
  
  <!-- 剩余数量 -->
  <div class="lt_num">
    数量:
    <div class="mui-numbox" data-numbox-step='1' data-numbox-min='1' data-numbox-max='{{ num }}'>
      <button class="mui-btn mui-numbox-btn-minus" type="button">-</button>
      <input class="mui-numbox-input" type="number" value="1" />
      <button class="mui-btn mui-numbox-btn-plus" type="button">+</button>
    </div>
    
    <span class="num">剩余数量：{{ num }} 双</span>
  </div>
  
  <!-- 商品描述 -->
  <div class="lt_desc">
    详情: {{ proDesc }}
  </div>

</script>


<script src="lib/zepto/zepto.min.js"></script>
<script src="lib/mui/js/mui.js"></script>
<script src="lib/artTemplate/template-web.js"></script>
<script src="js/common.js"></script>
<!-- 引入自己的 js -->
<script src="js/product.js"></script>

</body>
</html>